<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * @author  Nguyen Viet Manh
 * @email   manhnv85@gmail.com
 * @date    03.03.2012
 */
 
class Cat_course_model extends MY_Model {
    
    function __construct()
    {
        parent::__construct();
        $this->_table = 'cat_course';
    }
    
    function get_by_limit($limit = 10, $offset = 0)
    {
    	$result	=	array();
    	$result['rows']	=	$this->order_by('time_create','DESC')->limit($limit,$offset)->get_all();
    	$result['total']	=	$this->count_all();
    	return $result;
    }
}